{template 'common/header'}
    <ul class="nav nav-tabs">
        <li class=""><a href="{php echo $this->createWebUrl("infoset");}">图文管理</a></li>
        <li class="active"><a href="#">{php echo $data['id']>0 ? '通知图文' : '通知图文';}</a></a></li>    
        
    </ul>

<form action="" id="theform" name="theform"  method="post" class="form-horizontal form ng-pristine ng-valid" accept-charset="utf-8">
<input type="hidden" name="id" value="{$data['id']}" />
<input type="hidden" name="token" value="{$_W['token']}" />
<div class="panel panel-success">  
	<div class="panel-heading">
		图文基本信息&nbsp;&nbsp;
	</div>
                 
	<div class="panel-body">
        <div class="form-group">
            <label class="col-xs-12 col-md-3 col-lg-2 control-label">图文名称</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" placeholder="" name="info_name" id="info_name" value="{$data['info_name']}">
            	<span class="help-block">发放通知时选择对应图文</span>
            </div>                        
        </div>    
         
    
        <div class="form-group">
            <label class="col-xs-12 col-md-3 col-lg-2 control-label">图文标题</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" placeholder="" name="title" id="title" value="{$data['title']}">
            	<span class="help-block"></span>
            </div>                       
        </div> 
		<div class="form-group">
	       <label class="col-xs-12 col-sm-3 col-md-2 control-label">图文链接</label>
	      <div class="col-sm-8">
			{php echo tpl_form_field_image('logo', $data['logo'])}
	      </div>
      	</div>         
        <div class="form-group">
            <label class="col-xs-12 col-md-3 col-lg-2 control-label">图文详情</label>
			<div class="col-sm-8">
				<textarea name="content" style="height:100px; " class="form-control" cols="70" rows="100">{$data['content']}</textarea>
			</div>                                   
        </div>        
        <div class="form-group">
            <label class="col-xs-12 col-md-3 col-lg-2 control-label">图文链接</label>
            <div class="col-xs-8">
                <input type="text" class="form-control" placeholder="" name="link" id="link" value="{$data['link']}">
                <span class="help-block"></span>
            </div>                       
        </div>  

                             
    </div>        
</div>

    
		<div class="form-group">
			<div class="col-sm-12">
			<input type="submit"  name="submit" value="提交" class="btn btn-primary col-lg-1"/>
				
			</div>
		</div>

</form>

  
<script type="text/javascript">
require(['jquery', 'util'], function($, u){
	$(function(){
		//u.editor($('.richtext')[0]);	 
		$('#theform').submit(function(){
				var message = '';
				if($.trim($(':text[name=info_name]').val()) == '') {
					message += '必须输入图文名称<br>';
				}
				if($.trim($(':text[name=title]').val()) == '') {
					message += '必须输入图文标题<br>';
				}//textarea
				if(message) {
					u.message(message);
					return false;
				}
				return true;				
		});
	});	
});
</script>
{template 'common/footer'}